package feesmodule.domain;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="TYPE_DEFINITION")
public class TypeDefinition implements Serializable
{
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "TYPE_DEF_ID")
    private int id;
    @Column(name = "TYPE_NAME")
    private String name;
    @OneToMany(mappedBy="domainType", fetch=FetchType.LAZY)
    private Set<DomainDefinition> domainDefinition = new HashSet<DomainDefinition>();

    /**
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the domainDefinition
     */
    public Set<DomainDefinition> getDomainDefinition() {
        return domainDefinition;
    }

    /**
     * @param domainDefinition the domainDefinition to set
     */
    public void setDomainDefinition(Set<DomainDefinition> domainDefinition) {
        this.domainDefinition = domainDefinition;
    }
}
